package com.sf.fy.uav.applet.order.service;

import com.alibaba.fastjson.JSONObject;
import com.sf.fy.uav.common.request.order.*;
import com.sf.fy.uav.common.request.order.task.ConfirmPayRequest;
import com.sf.fy.uav.common.response.order.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * @author LTQ
 */
public interface OrderService {


    /**
     * 下单接口
     *
     * @param prepareOrderRequest
     * @return
     */
    PlaceOrderResponse placeOrder(PrepareOrderRequest prepareOrderRequest);


    /**
     * 下单接口
     *
     * @param prepareOrderForH5Request
     * @return
     */
    String placeOrderForH5(PrepareOrderForH5Request prepareOrderForH5Request);

    /**
     * 查询订单
     *
     * @param selectOrderRequest
     * @return
     */
    JSONObject selectOrder(SelectOrderRequest selectOrderRequest);


    /**
     * 添加反馈
     *
     * @param feedbackRequest
     */
    void add(@RequestBody FeedbackRequest feedbackRequest);

    /**
     * 获取反馈数据
     *
     * @param orderId
     * @return
     */
    FeedbackDetailsResponse getFeedback(String orderId);


    /**
     * 获取支付配置
     *
     * @param orderId
     * @return
     */
    PlaceOrderResponse getPaySettings(@RequestParam String orderId);

    /**
     * 确认支付
     *
     * @param confirmPayRequest
     * @return
     */
    Object confirmPay(ConfirmPayRequest confirmPayRequest);

    /**
     * @param confirmPayRequest
     * @return
     */
    Object confirmPayNoTransactional(ConfirmPayRequest confirmPayRequest);

    /**
     * 获取反馈类型
     *
     * @param orderId
     * @return
     */
    FeedbackTypeResponse getFeedbackType(@RequestParam String orderId);

    /**
     * 发送消息
     *
     * @param orderId
     */
    void sendPaySuccessMsg(String orderId);


    /**
     * 发送丰声消息
     *
     * @param orderId
     */
    void sendFsNoticeMsg(String orderId);


    /**
     * 发送丰声消息
     *
     * @param orderId
     */
    void sendNewOrderFsNoticeMsg(String orderId);


    /**
     * 发送丰声消息
     *
     * @param orderId
     */
    void sendFsOvertimeWarningNoticeMsg(String orderId);


    /**
     * 发送丰声消息
     *
     * @param orderId
     */
    void sendFsOvertimeNoticeMsg(String orderId);

    /**
     * 获取费用明细
     *
     * @param orderId
     * @return
     */
    FeeDetailsResponse getFeeDetails(@RequestParam String orderId);


    /**
     * 查询公共订单详情
     *
     * @param id 订单id
     * @return
     */
    PublicOrderDetailResponse getPublicOrderDetail(@RequestParam String id);


    /**
     * 获取openid
     *
     * @param loginCode
     * @return
     */
    String getNewOpenId(String loginCode);
}
